import request from '@/utils/request'

// 查询学生信息列表
export function listStudentInfo(query) {
  return request({
    url: '/student/studentInfo/list',
    method: 'get',
    params: query
  })
}

// 查询学生信息详细
export function getStudentInfo(id) {
  return request({
    url: '/student/studentInfo/' + id,
    method: 'get'
  })
}

// 新增学生信息
export function addStudentInfo(data) {
  return request({
    url: '/student/studentInfo',
    method: 'post',
    data: data
  })
}

// 修改学生信息
export function updateStudentInfo(data) {
  return request({
    url: '/student/studentInfo',
    method: 'put',
    data: data
  })
}
//修改状态
export function changeStudentStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/student/studentInfo/changeStatus',
    method: 'put',
    data: data
  })
}


// 删除学生信息
export function delStudentInfo(id) {
  return request({
    url: '/student/studentInfo/' + id,
    method: 'delete'
  })
}
